<? 
	include_once('../MembersOnly/global.php');
	$duplicate = "";
	if(isset($_REQUEST['IsPostBack']) && $_REQUEST['IsPostBack'] == 'true'){
		$_SESSION['cartCount'] = $_SESSION['cartCount'] + 1;
		$_SESSION['cartPrice'] = $_SESSION['cartPrice'] + $_REQUEST['Price'];
		if($duplicate != $_REQUEST['ItemId']){
			$_SESSION['Cart']['ItemId'] = $_REQUEST['ItemId'];
			$_SESSION['Cart']['ItemName'] = $_REQUEST['ItemName'];
			$_SESSION['Cart']['Price'] = $_REQUEST['Price'];
			$_SESSION['Cart']['Qty'] = $_REQUEST['Qty'] + 1;
		}else{
			$_SESSION[$_SESSION['cartCount']]['Qty'] = $_REQUEST['Qty'] + 1;
		}
		$duplicate = $_REQUEST['ItemId'];
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Nintendo Wii Accessories</title>
        <style type="text/css">
			<? include('../PageDetails/pagecss.css'); ?>
		</style>
    </head>
    
    <body background="../Admin/Images/saturnvalley.jpg" bgproperties="fixed" >
    	<div style="background-color:#FF9595">
        	<div class="cart">
            	<a href="http://www2.newpaltz.edu/~N02036842/WSP/Website/Admin/ShoppingCart/cart.php"><span style="margin-top:0px;">Shopping Cart:</span></a>
                 <?=$_SESSION['cartCount'] ?> 
                 <? if($_SESSION['cartCount'] == null) echo("");
				 	elseif($_SESSION['cartCount'] == 1) echo(" Item in your cart.");
				 	else echo(" Items in your cart.");					   
				?> ($<?=$_SESSION['cartPrice']?>)
            </div>
            <div class="signIn">
            	<div>
                	<? include('../MembersOnly/loginLinkControl.php'); ?>
                </div>
                <div style="float:right">
                	<a href="http://www2.newpaltz.edu/~N02036842/WSP/Website/MembersOnly/register.php">Register</a>
                </div>
            </div>
            <? include('../PageDetails/pageheader.php'); ?>
            <div class="productRow">
            	<div class="prodImgCell" style="width:150px; padding-left:10px">
                	<img src="../Admin/Images/Wii/wRpMP.jpg" width="60px" height="140px" />
                </div>
                <div class="textImgCell" >
                	<p style="font-weight:bold; height:5px; margin-top:10px">Wii Remote Plus White</p>
                    <hr color="#000000" width="160px" align="left" />
                    <p style="color:#999; font-size:12px; height:5px; padding-top:0px">By Nintendo of America</p>
                </div>
                <div class="priceCell">
                	<p style="font-size:14px; margin-top:10px; margin-bottom:0px; padding-bottom:0px">
                    	<span style="color:#666">BUY</span> <span style="color:red;">NEW</span></p>
                    <p style="font-size:24px; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">$39.99</p>
                    <form method="post">
                    	<input type="hidden" name="IsPostBack" value="true" />
                    	<input type="hidden" name="ItemId" value="NWRPW" />
                        <input type="hidden" name="ItemName" value="Wii Remote Plus White" />
                        <input type="hidden" name="Price"  value="39.99" />
                    	<input type="submit" value="Add to Cart" style="background-color:#5E9DE3; color:white;" />
                    </form>
                </div>
            </div>
            <br />
            <div class="productRow">
            	<div class="prodImgCell" style="width:150px; padding-left:10px">
                	<img src="../Admin/Images/Wii/bRpMP.jpg" width="60px" height="140px" />
                </div>
                <div class="textImgCell">
                	<p style="font-weight:bold; height:5px; margin-top:10px">Wii Remote Plus Black</p>
                    <hr color="#000000" width="170px" align="left" />
                    <p style="color:#999; font-size:12px; height:5px; padding-top:0px">By Nintendo of America</p>
                </div>
                <div class="priceCell">
                	<p style="font-size:14px; margin-top:10px; margin-bottom:0px; padding-bottom:0px">
                    	<span style="color:#666">BUY</span> <span style="color:red;">NEW</span></p>
                    <p style="font-size:24px; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">$39.99</p>
                    <form method="post">
                    	<input type="hidden" name="IsPostBack" value="true" />
                    	<input type="hidden" name="ItemId" value="NWRPB" />
                        <input type="hidden" name="ItemName" value="Wii Remote Plus Black" />
                        <input type="hidden" name="Price"  value="39.99" />
                    	<input type="submit" value="Add to Cart" style="background-color:#5E9DE3; color:white;" />
                    </form>
                </div>
            </div>
            <br />
            <div class="productRow">
            	<div class="prodImgCell" style="width:150px; padding-left:10px">
                	<img src="../Admin/Images/Wii/blackNun.jpg" width="100px" height="140px" />
                </div>
                <div class="textImgCell">
                	<p style="font-weight:bold; height:5px; margin-top:10px">Wii Nunchuk Controller Black</p>
                    <hr color="#000000" width="210px" align="left" />
                    <p style="color:#999; font-size:12px; height:5px; padding-top:0px">By Nintendo of America</p>
                </div>
                <div class="priceCell">
                	<p style="font-size:14px; margin-top:10px; margin-bottom:0px; padding-bottom:0px">
                    	<span style="color:#666">BUY</span> <span style="color:red;">NEW</span></p>
                    <p style="font-size:24px; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">$19.99</p>
                    <form method="post">
                    	<input type="hidden" name="IsPostBack" value="true" />
                    	<input type="hidden" name="ItemId" value="NWNCB" />
                        <input type="hidden" name="ItemName" value="Wii Nunchuk Controller Black" />
                        <input type="hidden" name="Price"  value="19.99" />
                    	<input type="submit" value="Add to Cart" style="background-color:#5E9DE3; color:white;" />
                    </form>
                </div>
            </div>
            <? include('../PageDetails/pagefooter.php'); ?>
        </div>
    </body>
</html>
